package org.opens.sql.constant;

/**
* 控制生成sql的删除模式
*
* @author by zhangyuming
* @date 2023/3/3
*/
public enum DeleteMode {

    PHYSICAL_DELETION("PHYSICAL_DELETION", "物理删除"),
    TOMBSTONE("TOMBSTONE", "逻辑删除");

    private String value;

    private String desc;

    DeleteMode(String typeName, String desc) {
        this.value = typeName;
        this.desc = desc;
    }

    public String getValue() {
        return value;
    }

    public static DeleteMode getInstance(String value) {
        for (DeleteMode item : DeleteMode.values()) {
            if (item.getValue().equals(value)) {
                return item;
            }
        }
        return null;
    }

    public String getValue() {
        return this.value;
    }

    public String getDesc() {
        return this.value;
    }

}